/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cw.view;

import java.util.Vector;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;

/**
 *
 * @author SVN - Team
 */
public class FromMainScreen extends Form implements CommandListener{
    private static final String TITLE = "Main Menu";
    private Command cmdAbout;
    private Command cmdExit;

    private MReviewer curDisplay;

    public FromMainScreen(MReviewer curDisplay) {
        super(TITLE);
        this.curDisplay = curDisplay;
        cmdAbout = new Command("About", Command.BACK, 0);
        cmdExit = new Command("Exit", Command.EXIT, 0);
        addCommand(cmdAbout);
        addCommand(cmdExit);
        setCommandListener(this);
    }
    public void commandAction(Command c, Displayable d) {
        if(c == cmdAbout) {
            //show infor about
        } else if(c == cmdExit) {
            curDisplay.destroyApp(true);
        }
    }

}
